<?php
	echo"请解除保险";
	exit;
	header("Content-Type: text/html; charset=UTF-8");
	$loginUrl = "http://tj.modenet.cn/index.php?app=member&act=login";
	$prefix = "shop";
	$cookiedir = getcwd().'\\cookie\\'.$prefix.'\\' ;
	//echo $cookiedir;
	//exit;
	$postData = array(
		'Submit'	=>	'请登录',
		'ret_url'	=>	'http%3A%2F%2Ftj.modenet.cn%2F',
		);
	$start	= 75;//开始ID
	$end	= 100;//结束ID，最后一个用户为$end-1
	//登录
	for ($i=$start; $i < $end; $i++) { 
		$ch = curl_init();
  		curl_setopt($ch, CURLOPT_URL, $loginUrl);
  		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  		//post数据
  		curl_setopt($ch, CURLOPT_POST, 1);
		$post = $postData;
		$post['user_name'] = $prefix.$i;
		//$post['email'] = $prefix.$i.'@'.$prefix.'.'.$prefix;
		$post['password'] = $prefix.$i.'pw';
		//$post['password_confirm'] = $post['password'];
		curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
		//cookie地址
		$cookiefile = $cookiedir.$i.'.cookie';
		curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
		curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile); 
		//执行
		$result = curl_exec($ch);
		curl_close($ch);
		echo $prefix.$i.'已登录';
		echo '<br />';
		//print_r($post);
	}


	//开店
	for ($i=$start; $i < $end; $i++) { 
		$cate_id = $i%4+1;
		$shopUrl = "http://tj.modenet.cn/index.php?app=bchanges&act=upload&cate_id=".$cate_id;
		$ch = curl_init();
  		curl_setopt($ch, CURLOPT_URL, $shopUrl);
  		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  		//post数据
  		curl_setopt($ch, CURLOPT_POST, 1);
		$post = $postData;
		$post = array(
		    'cate_id' => $cate_id,
		    'com_name' => $i,
		    'com_area' => $i,
		    'com_add' => $i,
		    'com_x' => $i,
		    'com_y' => $i,
		    'com_phone' => $i,
		    'staff_num' => $i,
		    'com_fund' => $i,
		    'peo_name' => $i,
		    'peo_phone' => $i,
		    'peo_id' => $i,
		    'peo_email' => $i,
		    'peo_postcode' => $i,
		    'bus_lic_num' => $i,
		    'bus_lic_area' => $i,
		    'bus_lic_t_f' => $i,
		    'bus_lic_t_t' => $i,
		    'bus_lic_sco' => $i,
		    'tax_reg_cer' => $i,
		    'organ_code' => $i,
		    'organ_t_f' => $i,
		    'organ_t_t' => $i
		);
		//$post['user_name'] = $prefix.$i;
		//$post['email'] = $prefix.$i.'@'.$prefix.'.'.$prefix;
		//$post['password'] = $prefix.$i.'pw';
		//$post['password_confirm'] = $post['password'];
		curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
		//cookie地址
		$cookiefile = $cookiedir.$i.'.cookie';
		curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
		curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile); 
		//执行
		$result = curl_exec($ch);
		curl_close($ch);
		echo $prefix.$i.'开店了';
		echo '<br />';
		//print_r($post);
	}

// 	Array
// (
//     [cate_id] => 
//     [com_name] => 
//     [com_area] => 
//     [com_add] => 
//     [com_x] => 
//     [com_y] => 
//     [com_phone] => 
//     [staff_num] => 
//     [com_fund] => 
//     [peo_name] => 
//     [peo_phone] => 
//     [peo_id] => 
//     [peo_email] => 
//     [peo_postcode] => 
//     [bus_lic_num] => 
//     [bus_lic_area] => 
//     [bus_lic_t_f] => 
//     [bus_lic_t_t] => 
//     [bus_lic_sco] => 
//     [tax_reg_cer] => 
//     [organ_code] => 
//     [organ_t_f] => 
//     [organ_t_t] => 
// )
